﻿package com.bizmlib.utils
{
	import flash.utils.getQualifiedClassName;
	
	
	public function getSimplifiedClassName(value:*):String
	{
		var className:String = getQualifiedClassName(value);
		var re:RegExp;
		
		re = /^\w+$/;
		
		if(re.test(className))
		{
			return className;
		}
		
		re = /.*\W(\w+)$/;
		
		if(re.test(className))
		{
			var result:Array = re.exec(className);
			if(result.length>1)
			{
				return result[1];
			}
		}
		
		return undefined;
	}
}